﻿using System;

namespace Toybox.NicoSharp.Extensions
{
	public static class NicoSharpEnumExtension
	{
		public static string ToSign(this LiveTabType type)
		{
			return Enum.GetName(typeof(LiveTabType), type).ToLower();
		}

		public static string ToSign(this LiveSortType type)
		{
			return Enum.GetName(typeof(LiveSortType), type);
		}

		public static string ToSign(this VideoSortType type)
		{
			switch (type)
			{
				case VideoSortType.CommentDate:
					return "n";
				case VideoSortType.ViewCounter:
					return "v";
				case VideoSortType.CommentNum:
					return "r";
				case VideoSortType.MylistCounter:
					return "m";
				case VideoSortType.PostDate:
					return "f";
				case VideoSortType.PlayTime:
					return "l";
				default:
					return string.Empty;
			}
		}
	}
}
